- return unless current_user && current_user.namespace

- type = blob ? 'blob' : 'tree'
- button_data = web_ide_button_data({ blob: blob })
- fork_options = fork_modal_options(@project, blob)
- css_classes = false unless local_assigns[:css_classes]

.gl-inline-block{ data: { options: button_data.merge(fork_options).to_json, css_classes: css_classes, default_branch: @project.default_branch_or_main }, id: "js-#{type}-web-ide-link" }
